SEO - Google and link cleaning / cloaking [closed]

Posted by Jens Törnell on Pro Webmasters See other posts from Pro Webmasters or by Jens Törnell
Published on 2012-11-29T12:36:33Z Indexed on 2012/11/29 17:19 UTC
Read the original article Hit count: 493

Filed under:
|
|

Possible Duplicate:
Does the Google spider render JavaScript?

This a SEO related question, not a code related one.

Googles own link cleaning / cloaking

Gå to http://www.google.com and search for something.

  1. Hover the title and you will se a link to the page you want to go to.
  2. The URL you see when hovering is NOT the link you are clicking on.
  3. Instead of clicking you can drag the title a little bit and then hover it. Then you will se the real URL.

My own link cleaning / cloaking

  1. Go to http://jsfiddle.net/NvmER/1/ and click the link, or look at the code below.
  2. You will be "redirected" to http://www.test.com.
  3. The real link are http://www.test.com/?event=23

Working code in case jsfiddle don't work

If you need to se how it works I pasted a code below.

<a class="direct" href="http://www.test.com/?event=23" data-redirect="http://www.test.com">Länk</a>?

$(document).ready(function() {
    $("a.direct").live("mousedown", function(e){
        var oldurl = $(this).attr('href');
        var newurl = $(this).attr('data-redirect');
        $(this).attr('href', newurl);
    });
});?

Question

Is this ok with Google? It's done with javascript.

If you have an answer, link to a source or test to support it.

© Pro Webmasters or respective owner

Related posts about seo

Related posts about JavaScript